package com.itheima.service.impl;

import com.itheima.service.LogPrintService;
import lombok.extern.slf4j.Slf4j;
import com.itheima.entity.OperateLog;
import com.itheima.entity.OperateUser;

@Slf4j
public class ConsoleLogPrintService implements LogPrintService {
    @Override
    public void printLog(OperateLog operateLog) {
        log.info("操作人id :{},操作人姓名:{}，操作时间:{}，方法全类名:{}，方法名:{}，方法参数:{}，返回值:{}，运行时间:{},方法描述:{}",
                operateLog.getOperateUser(),operateLog.getOperateName(),operateLog.getOperateTime(),operateLog.getClassName(),
                operateLog.getMethodName(),operateLog.getMethodParams(),operateLog.getReturnValue(),operateLog.getCostTime(),operateLog.getMethodDesc());
    }

    @Override
    public OperateUser getOperateUser() {
        return new OperateUser();
    }
}
